import request from '@/utils/request'
export const getUserAPI = (data) => {
  return request.get('/sys/user', data)
}

export function exportEmployeeAPI() {
  return request({
    url: '/sys/user/export',
    responseType: 'blob'
  })
}

export function getEmployeeTempAPI() {
  return request({
    url: '/sys/user/import/template',
    responseType: 'blob'
  })
}
export function updateLoadAPI(data) {
  return request({
    url: '/sys/user/import',
    method: 'post',
    data
  })
}
export function delEmployeeAPI(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete'
  })
}
export function createdEmployeeAPI(data) {
  return request({
    url: '/sys/user',
    method: 'post'
  })
}
// export function getUserInfoAPI(id) {
//   return request({
//     url: `/sys/user/${id}`,
//     method: 'get'
//   })
// }
export function getUserInfoAPI(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
export function updateEmployeeAPI(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}
